@extends('admin.base.index')
@section('content')
			<form action="" method="post" name="myform">
				<input type="hidden" name="_token" value="{{ csrf_token() }}">
				<input type="hidden" name="_method" value="delete">
			</form>

			<form action='{{ url("admin/links")}}' method='get'>
			        <div class='media-body'>
			            链接名：<input type='text' class='form-control m-b-5' name='linksname'>
			        </div>
			        <input type='submit' class='btn' value='搜索'>
			    </form>
	            <table class="table tile">
	                <thead>
	                    <tr>
	                        <th>id号</th>
	                        <th>链接名</th>
	                        <th>链接地址</th>
	                        <th>操作</th>
	                    </tr>
	                </thead>
	                <tbody>
	                @foreach($list as $v)
	                    <tr>
	                        <td>{{ $v->linksid}}</td>
	                        <td>{{ $v->linksname}}</td>
	                        <td>{{ $v->linksurl}}</td>
	                        <td>
		                        <a href="javascript:doDel({{$v->linksid}})">删除</a>|
								<a href="{{ url('admin/links') }}/{{$v->linksid}}/edit">修改</a>
	                        </td>
	                    </tr>
	                @endforeach   
	                </tbody>
	            </table>
	            <script type="text/javascript">
					function doDel(id){
						if(confirm("是否删除？")){
							var a = document.myform;
							a.action = "{{ url('admin/links') }}/"+id;
							a.submit();
						}
					}
		</script>
	{{ $list->appends($where)->links() }}
	       
@stop